Author: Michael Karcher <debian@mkarcher.dialup.fu-berlin.de>
Description: This patch fixes harmless warnings, mostly suggested parentheses.

--- unace-nonfree-2.5.orig/source/apps/exe/convert/convert.c
+++ unace-nonfree-2.5/source/apps/exe/convert/convert.c
@@ -109,7 +109,7 @@ INT       UnitCharNumber;
   {
     UnitCharNumber = 0;
 
-    while (Size > 999999999 || UnitCharNumber && Size > 99999999)
+    while (Size > 999999999 || (UnitCharNumber && Size > 99999999))
     {
       Size >>= 10;
       UnitCharNumber++;
--- unace-nonfree-2.5.orig/source/apps/exe/messages/messages.c
+++ unace-nonfree-2.5/source/apps/exe/messages/messages.c
@@ -192,7 +192,7 @@ INT     APPS_EXE_MESSAGES_GetHotKey(PCHA
 {
 PCHAR     AndPos;
 
-  if (AndPos = strchr(Str, '&'))
+  if ((AndPos = strchr(Str, '&')))
   {
     strcpy(AndPos, AndPos + 1);
 
--- unace-nonfree-2.5.orig/source/apps/unace/exe/commline/commline.c
+++ unace-nonfree-2.5/source/apps/unace/exe/commline/commline.c
@@ -393,7 +393,7 @@ INT       I;
 
 void    APPS_UNACE_EXE_COMMLINE_ToggleSwitch(PCHAR SwitchChar, PINT Variable)
 {
-  if (!(*SwitchChar) || *SwitchChar == '+' && *(SwitchChar + 1) == 0)
+  if (!(*SwitchChar) || (*SwitchChar == '+' && *(SwitchChar + 1) == 0))
   {
     *Variable = 1;
   }
@@ -549,9 +549,9 @@ PCHAR     PointPos;
       if (strrchr(APPS_UNACE_EXE_COMMLINE.WildcardedArchiveName, BASE_PATHFUNC_SEPARATOR)
             > PointPos
           || !PointPos
-          || !BASE_CONVERT_StrICmp(PointPos, ".")
-            && !BASE_CONVERT_StrICmp(PointPos, ".ace")
-            && !BASE_CONVERT_StrICmp(PointPos, ".exe"))
+          || (!BASE_CONVERT_StrICmp(PointPos, ".")
+              && !BASE_CONVERT_StrICmp(PointPos, ".ace")
+              && !BASE_CONVERT_StrICmp(PointPos, ".exe")))
       {
         strcat(APPS_UNACE_EXE_COMMLINE.WildcardedArchiveName,
                BASE_ACESTRUC_EXTENSION);
--- unace-nonfree-2.5.orig/source/base/all/arcblk/arcblk.c
+++ unace-nonfree-2.5/source/base/all/arcblk/arcblk.c
@@ -117,7 +117,7 @@ void    BASE_ARCBLK_FileHeaderSecurityRe
   if ((Header->File.HEAD_FLAGS & BASE_ACESTRUC_FLAG_SECURITY)
       && (*Size = BASE_ARCBLK_FileHeaderSecuritySize(Header)))
   {
-    if (*Security = BASE_MEMORY_GetMem(*Size))
+    if ((*Security = BASE_MEMORY_GetMem(*Size)))
     {
       memcpy(*Security, BASE_ARCBLK_FileHeaderSecurity(Header), *Size);
     }
--- unace-nonfree-2.5.orig/source/base/all/archives/test/test.c
+++ unace-nonfree-2.5/source/base/all/archives/test/test.c
@@ -59,7 +59,7 @@ tBASE_DIRDATA_DirData
                   (PVOID)&BASE_ARCHIVES_TEST.TestBuffer[TestPos],
                   512 + 32 -TestPos);
                         	
-      if (!Read && !TestPos || errno)
+      if ((!Read && !TestPos) || errno)
       {
         break;
       }
--- unace-nonfree-2.5.orig/source/base/all/comments/comments.c
+++ unace-nonfree-2.5/source/base/all/comments/comments.c
@@ -47,7 +47,11 @@ PCHAR     CommentPos;
     CommentSize = sizeof(BASE_COMMENTS.Comment) - 1;
   }
 
-  memcpy(BASE_COMMENTS.Comment, CommentPos, CommentSize);
+  if(CommentSize > 0)
+  {
+    memcpy(BASE_COMMENTS.Comment, CommentPos, CommentSize);
+  }
+  
   BASE_COMMENTS.CompressedSize = CommentSize;
   BASE_DCPR_COMMENTS_GetComment();
 
--- unace-nonfree-2.5.orig/source/base/all/dcpr/dcpr.c
+++ unace-nonfree-2.5/source/base/all/dcpr/dcpr.c
@@ -125,8 +125,8 @@ INT       R,
     RestLen           -= R;
   }
   while ((R || BASE_DCPR.NextType != BASE_DCPR.Type
-           || (BASE_DCPR.NextType == BASE_ACESTRUC_BLOCKEDTYPE_LZ77_DELTA)
-               && BASE_DCPR_LZ77.NextDeltaLen)
+           || ((BASE_DCPR.NextType == BASE_ACESTRUC_BLOCKEDTYPE_LZ77_DELTA)
+                && BASE_DCPR_LZ77.NextDeltaLen))
          && (RestLen > BASE_CPRDCPR_LZ77_MAXLEN));
 
   return Len - RestLen;
--- unace-nonfree-2.5.orig/source/base/all/dosfuncs/lin.c
+++ unace-nonfree-2.5/source/base/all/dosfuncs/lin.c
@@ -46,7 +46,7 @@ PCHAR	  ChPtr;
     {
       BASE_PATHFUNC_CompletePath(DirToOpen);
 
-      if (ChPtr = strrchr(DirToOpen, BASE_PATHFUNC_SEPARATOR))
+      if ((ChPtr = strrchr(DirToOpen, BASE_PATHFUNC_SEPARATOR)))
       {
         strcpy(SearchMask, ChPtr + 1);
     
--- unace-nonfree-2.5.orig/source/base/all/extract/extract.c
+++ unace-nonfree-2.5/source/base/all/extract/extract.c
@@ -134,7 +134,7 @@ UINT	  NTFSSecuritySize;
       Decompressed = BASE_DCPR_Block(&Buf[BufPos], BufSize
                                      + BASE_CPRDCPR_LZ77_MAXLEN - BufPos);
 
-      if (!Decompressed && !BufPos || BASE_ERROR_EXTERN_HandleCancel(1))
+      if ((!Decompressed && !BufPos) || BASE_ERROR_EXTERN_HandleCancel(1))
       {
         break;
       }
@@ -265,8 +265,8 @@ INT       FilesNumber;
 
   while (!BASE_ERROR_EXTERN_HandleCancel(1)
          && (BASE_EXTRACT.DoExtractAllVolumes
-             || BASE_ARCBLK.Options.IsVolume
-                && BASE_EXTRACT.DoProcessAllVolumes
+             || (BASE_ARCBLK.Options.IsVolume
+                 && BASE_EXTRACT.DoProcessAllVolumes)
              || FilesNumber)
          && BASE_ARCBLK_LoadBlock())
   {
@@ -348,8 +348,8 @@ tLFN      ArchiveName;
 
   if (BASE_VOLUME_FirstVolumeToProcess(ArchiveName))
   {
-    if (!DoWriteData && BASE_ARCBLK.Options.IsSolid
-        || !BASE_FILELIST.Number)
+    if ((!DoWriteData && BASE_ARCBLK.Options.IsSolid)
+         || !BASE_FILELIST.Number)
     {
       BASE_EXTRACT.DoExtractAllVolumes = 1;
       BASE_FILELIST.SizeOfFiles = BASE_DIRDATA_Dir1.UnPackedSize;
--- unace-nonfree-2.5.orig/source/base/all/funcs/funcs.c
+++ unace-nonfree-2.5/source/base/all/funcs/funcs.c
@@ -24,10 +24,11 @@ void    BASE_FUNCS_Copy(INT Mode)
   BASE_FILELIST.DoAddFileCheckIfValidFile =
     !BASE_DIRDATA_IsInArchive1 && BASE_DIRDATA_IsInArchive2;
 
-  if (BASE_EXTRACT.DoExtractAllVolumes
-      && BASE_FILELIST_Create(1, 5, 1)
-        || !BASE_EXTRACT.DoExtractAllVolumes
-        && BASE_FILELIST_Create(1, Mode, 1))
+  if ((BASE_EXTRACT.DoExtractAllVolumes
+       && BASE_FILELIST_Create(1, 5, 1))
+        ||
+      (!BASE_EXTRACT.DoExtractAllVolumes
+       && BASE_FILELIST_Create(1, Mode, 1)))
   {
     BASE_FUNCS_EXTERN_DoCopy(Mode);
 
@@ -45,7 +46,7 @@ void    BASE_FUNCS_Copy(INT Mode)
 
 INT     BASE_FUNCS_DeleteRealFile(PCHAR FileName, BOOL IsOverwriteDelete)
 {
-BOOL      Err;
+BOOL      Err = 0;
 INT       Input;
 UINT      Attr;
 
@@ -76,11 +77,12 @@ UINT      Attr;
           {
             BASE_ERROR.ErrorCode = BASE_ERROR_USER;
           }
-        }
-
-        if (Input && !BASE_FUNCS.DoDeleteAll)
-        {
-          return 1;
+          
+          if (Input > 1)
+          {
+            return 1;
+          }
+            
         }
 
         BASE_LFN_SetFileAttributes(FileName, BASE_DOSFUNCS_NORMAL);
@@ -162,7 +164,7 @@ INT       BaseLen;
 INT     BASE_FUNCS_CreateDestinationFile(INT Attr)
 {
 INT       Handle,
-          Input,
+          Input = 0,
           Len;
 
   sprintf(BASE_STATE.DestinationFileName, "%s%s",
@@ -224,7 +226,7 @@ INT       Handle,
       }
 
       BASE_FUNCS.DidNotCopyAll |=
-        (Input = (Input && !BASE_FUNCS.DoOverwriteAll
+        (Input = ((Input && !BASE_FUNCS.DoOverwriteAll)
                   || BASE_FUNCS_DeleteRealFile(BASE_STATE.DestinationFileName, 1)));
 
       if (Input)
--- unace-nonfree-2.5.orig/source/base/all/lfn/lin.c
+++ unace-nonfree-2.5/source/base/all/lfn/lin.c
@@ -50,7 +50,7 @@ tLFN      SearchFile,
   {
     SepStr = getenv("PATH");
 
-    if (Env = (PCHAR) BASE_MEMORY_GetMem(strlen(SepStr) + 1))
+    if ((Env = (PCHAR) BASE_MEMORY_GetMem(strlen(SepStr) + 1)))
     {
       strcpy(Env, SepStr);
       SepStr = Env;
--- unace-nonfree-2.5.orig/source/base/all/lfn/nont.c
+++ unace-nonfree-2.5/source/base/all/lfn/nont.c
@@ -52,7 +52,7 @@ INT       NameNumber,
 
     do
     {
-      if (NextSlashPos = (PCHAR) strchr(NamePos, BASE_PATHFUNC_SEPARATOR))
+      if ((NextSlashPos = (PCHAR) strchr(NamePos, BASE_PATHFUNC_SEPARATOR)))
       {
         NameLen = NextSlashPos - NamePos;
       }
--- unace-nonfree-2.5.orig/source/base/all/memory/nodos32.c
+++ unace-nonfree-2.5/source/base/all/memory/nodos32.c
@@ -14,7 +14,7 @@ INT       OldSize;
 
   OldSize = BASE_MEMORY_Size(OldPointer);
 
-  if (NewPointer = realloc((PVOID) ((PULONG) OldPointer - 1), NewSize + 4))
+  if ((NewPointer = realloc((PVOID) ((PULONG) OldPointer - 1), NewSize + 4)))
   {
     BASE_MEMORY.MaxAllocate += OldSize - NewSize;
     *(PULONG) NewPointer = NewSize;
--- unace-nonfree-2.5.orig/source/base/all/pathfunc/pathfunc.c
+++ unace-nonfree-2.5/source/base/all/pathfunc/pathfunc.c
@@ -140,7 +140,7 @@ INT       I,
         DoRepeat = 0;
         strcpy(CompareStr1, SlashPos);
 
-        if (NextSlashPos = strchr(SlashPos + 1, BASE_PATHFUNC_SEPARATOR))
+        if ((NextSlashPos = strchr(SlashPos + 1, BASE_PATHFUNC_SEPARATOR)))
         {
           CompareStr1[NextSlashPos - SlashPos] = 0;
         }
@@ -345,11 +345,12 @@ INT       CurrentDirLen;
         || !strchr(Path, ':'))
       && Path[0] != '/')
 */
-  if (Path[0] == '\\' && Path[1] != '\\'
-       || Path[0] != BASE_PATHFUNC_SEPARATOR 
+  if ((Path[0] == '\\' && Path[1] != '\\')
+       || (Path[0] != BASE_PATHFUNC_SEPARATOR 
 #ifndef __unix__
        && !strchr(Path, ':')
 #endif
+          )
        )
   {
     getcwd(CurrentDir, sizeof(CurrentDir));
@@ -390,7 +391,7 @@ BOOL    BASE_PATHFUNC_IsNTFSStreamName(P
 {
 PCHAR     Ptr;
 
-  if (Ptr = strrchr(Path, ':'))
+  if ((Ptr = strrchr(Path, ':')))
   {
     return *(Ptr + 1) != '\\';
   }
--- unace-nonfree-2.5.orig/source/base/all/state/state.h
+++ unace-nonfree-2.5/source/base/all/state/state.h
@@ -54,6 +54,7 @@ void    BASE_STATE_OutputProgress(INT Re
 void    BASE_STATE_OutputCRCOk(BOOL CRCIsOk);
 
 void    BASE_STATE_EXTERN_IsCRCOk(PBOOL IsCRCOk, BOOL IsEncrypted);
+void    BASE_STATE_EXTERN_IsCRCOkSet(PBOOL IsCRCOk, BOOL IsEncrypted);
 void    BASE_STATE_EXTERN_OutputProgressData(PCHAR Buf, INT Bytes);
 
 void    BASE_STATE_EXTERN_OutputProcess(PCHAR OperationStr, PCHAR FileName,
